import { service as request } from '../../utils/request';

export function useAgvApi() {
	return {
		getAllInfo: (params?: object) => {
			return request({
				url: '/agv/all',
				method: 'get',
				params,
			});
		},
		getAgvMap: (params?: object) => {
			return request({
				url: '/agv/map',
				method: 'get',
				params,
			});
		},
		runControl: (data: TAgvParam) => {
			return request({
				url: '/agv/control',
				method: 'post',
				data,
			});
		},

		runNav: (data: TAgvParam) => {
			return request({
				url: '/agv/nav',
				method: 'post',
				data,
			});
		},

		runConfig: (data: TAgvParam) => {
			return request({
				url: '/agv/config',
				method: 'post',
				data,
			});
		},

		runOhter: (data: TAgvParam) => {
			return request({
				url: '/agv/other',
				method: 'post',
				data,
			});
		},

	};
}
